1. Technical Field
The present invention relates to mail handling in general, and in particular to a method and apparatus for evaluating barcode on mails. Still more particularly, the present invention relates to a method and apparatus for evaluating a confidence level of a decoded barcode from a mail piece.
2. Description of the Related Art
In recent years, the United States Postal Service (USPS) has adopted a new form of zip codes that contains more detailed destination information than the original five-digit zip codes. The so-called ZIP+4 zip code contains an additional four-digit extension that generally identifies an address within a side of residential block. A further enhancement to the zip code system is the utilization of a 11-digit zip code to specify a point of delivery.
In conjunction with the new zip code system, the USPS also developed the Postal Numeric Encoding Technique (POSTNET) to provide an optimized barcode system for encoding zip code information on mail pieces. As an inducement to mailers to prepare their mails in such a way so as to bring about faster mail delivery, the USPS offers postage discounts to mailers for mail items such as presorted mail. Postage discounts are also given to mailers when mails are pre-printed with a 11-digit zip code in an approved barcode format.
Even if a mail piece does not have a pre-printed barcode, the USPS can provide the mail piece with a POSTNET barcode. This is because barcoding enable mail sorting machines to sort and route mails in a more rapid fashion. Generally speaking, the digits in a POSTNET barcode are encoded using a fixed number of tall bars and a fixed number of short bars. In order to guard against errors, two levels of redundancy are incorporated within each POSTNET barcode. The first level of redundancy is in the way digits are encoded. Each digit is encoded in a way that the location of a tall bar can be deduced from the locations of all short bars, and vice versa. The second level of redundancy is the inclusion of a correction digit to the entire 11-digit zip code. The inclusion of a correction digit ensures that the sum of all the digits (i.e., checksum) within a POSTNET barcode is a multiple of 10. Thus, if a digit within a POSTNET barcode cannot be decoded, the checksum can be used to determine such.
Even with the two levels of built-in redundancy as mentioned above, errors will still occur when decoding a POSTNET barcode. Thus, it would be desirable to provide a method and apparatus for evaluating a confidence level of a decoded POSTNET barcode.
In accordance with a preferred embodiment of the present invention, a digit score is assigned to a digit within a barcode. When decoding the barcode, if a deduction is required to decode the digit, then the digit score for the digit is reduced accordingly. After all the digits within the barcode have been decoded, a total score of a decoded barcode value can be determined by adding all the digit scores for all the digits within the barcode. The total score of the decoded barcode value is reduced if a checksum is used to ascertain the value of any digit within the barcode. The decoded barcode value can be accepted only if the total score exceeds a predetermined value.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.